<?php
/**
 * 常量定义.
 * User: chan
 * Date: 2017/8/14 13:37
 */
define('TIMESTAMP',time());
// 定义host
define('__ROOT__',"https://".$_SERVER['HTTP_HOST']);
define('IMG_PATH',"https://".$_SERVER['HTTP_HOST'] . '/static/uploads/');
define('IMG_PATH_LICENSE',"https://".$_SERVER['HTTP_HOST'] . '/static/certificates/');
define('ORDER_COMMENT_IMG_PATH',"https://".$_SERVER['HTTP_HOST'] . '/uploads/');
// 定义时间
define('NOW_TIME',$_SERVER['REQUEST_TIME']);
define('BAIDU_AK','9XCxVAh0MhPMfuZnAg0XX8F3BF2fk2SI');//百度AK

// +----------------------------------------------------------------------
// | 订单状态
// +----------------------------------------------------------------------
define('ORDER_STATUS_NOPAY','0');//0待付款
define('ORDER_STATUS_PAID','1');//1已付款
define('ORDER_STATUS_SUCCESS','3');//2已完成
define('ORDER_STATUS_CLOSE','-2');//-1已关闭

// +----------------------------------------------------------------------
// | 订单类型
// +----------------------------------------------------------------------
define('ORDER_TYPE_BOOK','1');//预约
define('ORDER_TYPE_TAKEAWAY','2');//配送
define('ORDER_TYPE_RESTAURANT','3');//扫码点餐
define('ORDER_TYPE_MENTION','4');//自提

// +----------------------------------------------------------------------
// | 优惠劵发放状态
// +----------------------------------------------------------------------
define('COUPON_GRANT_STATUS_NORMAL',1);//正常
define('COUPON_GRANT_STATUS_STOP',0);//停用

// +----------------------------------------------------------------------
// | 我的代金劵状态
// +----------------------------------------------------------------------
define('COUPON_STATUS_UNUSEFUL',-1);//失效的
define('COUPON_STATUS_NORMAL',0);//正常的
define('COUPON_STATUS_USED',1);//已使用的

// +----------------------------------------------------------------------
// | 我的优惠劵状态
// +----------------------------------------------------------------------
define('VOUCHER_STATUS_UNUSEFUL',-1);//失效的
define('VOUCHER_STATUS_NORMAL',0);//正常的
define('VOUCHER_STATUS_USED',2);//已使用的

// +----------------------------------------------------------------------
// | 支付类型
// +----------------------------------------------------------------------
define('PAY_TYPE_BOOK','1');//预约金
define('PAY_TYPE_ORDER','2');//外卖或快餐店支付
define('PAY_TYPE_COUPON','3');//代金劵
define('PAY_TYPE_PAY','4');//买单

// +----------------------------------------------------------------------
// | 支付状态
// +----------------------------------------------------------------------
define('PAY_NO','0');//未支付
define('PAY_SUCCESS','1');//支付成功
define('PAY_OVERTIME','-1');//支付超时

// +----------------------------------------------------------------------
// | 菜品开卖状态
// +----------------------------------------------------------------------
define('FOOD_IS_OPEN_YES',0);//正常
define('FOOD_IS_OPEN_NO',1);//不卖

// +----------------------------------------------------------------------
// | 菜品售罄状态
// +----------------------------------------------------------------------
define('FOOD_IS_SELL_OUT_YES',0);//正常
define('FOOD_IS_SELL_OUT_NO',1);//售罄

// +----------------------------------------------------------------------
// | 预约类型
// +----------------------------------------------------------------------
define('BOOK_TYPE_TABLE',1);//只订桌
define('BOOK_TYPE_TABLE_FOOD',2);//订桌和餐

// +----------------------------------------------------------------------
// | 外卖开启状态
// +----------------------------------------------------------------------
define('OUTFOOD_OPEN',1);//开启
define('OUTFOOD_CLOSE',0);//关闭

// +----------------------------------------------------------------------
// | 预约开启状态
// +----------------------------------------------------------------------
define('ORDERING_OPEN',1);//开启
define('ORDERING_CLOSE',0);//关闭

// +----------------------------------------------------------------------
// | 是否有发票状态
// +----------------------------------------------------------------------
define('IS_INVOICE_YES',1);//有发票
define('IS_INVOICE_NO',0);//没发票


// +--------------
// | 打印机账号密码
define('USER', '8594167@qq.com');  //*必填*：飞鹅云后台注册账号
define('UKEY', 'UJ4k54FcMbZSkuE9'); //*必填*: 飞鹅云注册账号后生成的UKEY
define('SN_RECEIPT', '918500650');  //小票打印机
define('SN_LABEL',   '960209903');  //旺菜通标签打印机

//以下参数不需要修改
define('IP','api.feieyun.cn');          //接口IP或域名
define('PORT',80);                      //接口IP端口
define('PATH','/Api/Open/');        //接口路径
define('STIME', time());                //公共参数，请求时间
define('SIG', sha1(USER.UKEY.STIME));   //公共参数，请求公钥